package com.platform.qujia.enums;

/**
 * @date 2023/12/7
 */
public enum BalanceTypeEnum {
    RECHARGE("cz","充值"),  //储值卡
    CONSUMPTION("xf","消费"),  //储值卡
    RATION_RECHARGE("dcz","定额卡充值"),
    RATION_CONSUMPTION("dxf","定额卡消费"),
    ;

    private String value;
    private String text;

    BalanceTypeEnum(String value, String text){
        this.value = value;
        this.text = text;
    }

    public static BalanceTypeEnum getBalanceTypeEnum(String parameter){
        for (BalanceTypeEnum value : BalanceTypeEnum.values()) {
            if(value.getValue().equals(parameter) || value.getText().equals(parameter)){
                return value;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
